
<div id="main-content"> <!-- Main Content Section with everything -->			
	<!-- Page Head -->			
	<form name='search' method='get' action=''>
		<label>关键词：</label>
		<input class="text-input" id='key' type='text' name='key' value='<?php echo $key?$key:'';?>' />
		<select name="options" >
			<option value="1" <?php echo $options=='1'?'selected':'';?>>在职</option>
			<option value="2" <?php echo $options=='2'?'selected':'';?>>离职</option>
		</select> 
		<input class="button" type='submit' value='搜索' />
		<input class='reset button' type='button' value='重置'/>
	</form>				
	<div class="clear"></div> <!-- End .clear -->
	
	<div class="content-box"><!-- Start Content Box -->
		
		<div class="content-box-header">
			
			<h3>员工管理</h3>					
			<div class="clear"></div>
			
		</div> <!-- End .content-box-header -->
		
		<div class="content-box-content">
			
			<div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab -->						
				<table>
					
					<thead>
						<tr>
						   <th>No.</th>
						   <th>员工姓名</th>
						   <th>主机名&主机配件</th>
						   <th>外设</th>
						   <th>参考书</th>
						</tr>
						
					</thead>
				 
					<tfoot>
						<tr>
							<td colspan="6">										
								<div class="pagination">
									<?php echo $page;?><!-- 分页 -->										
								</div> <!-- End .pagination -->
								<div class="clear"></div>
							</td>
						</tr>
					</tfoot>
				 
					<tbody>
					<?php $i=0; foreach($query as $row):?>
						<tr>									
							<td><?php $i++;echo $i;?></td>
							<td>
								<a href="<?php echo base_url()?>staff/table_print/<?php echo $row['id'];?>" title="打印">
									<?php echo $row['name'];?>
								</a>
							</td>
							<td>
							<?php 
								foreach($row['host'] as $h){
									$parts = '';
									foreach($h['parts'] as $v){
										$parts .= $v['brand'].$v['condition'].$v['name'].'；';
									}
									echo $h['brand'].$h['name'].'：'.$parts.'<br />';
								}
							?>
							</td>
							<td>
								<?php 
									foreach($row['device'] as $v){
										echo $v['name'].':'.$v['brand'].'-'.$v['condition'].'；';
									}
								?>
							</td>
							<td>
								<?php 
									foreach($row['books'] as $v){
										echo '《'.$v['name'].'》；';
									}
								?>
							</td>
						</tr>
					<?php endforeach;?>	
					</tbody>
					
				</table>
				
			</div> <!-- End #tab1 -->
			

			
		</div> <!-- End .content-box-content -->
		
	</div> <!-- End .content-box -->
	<div class="clear"></div>			
</div> <!-- End #main-content -->	
